﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ICC
    {
        [OperationContract]
        CCInfo CC_GetInfo(int CCID);

        [OperationContract]
        DataSet CC_GetList(out int ItemCount, int CandidateID, int currentPage, int pageSize);

        [OperationContract]
        int CC_Insert(CCInfo eInfo);

        [OperationContract]
        bool CC_Update(CCInfo eInfo);

        [OperationContract]
        bool CC_Delete(int CCID);

        [OperationContract]
        bool CC_Exist(int CCID, int CC_CandidateID, string CCNo);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class CCInfo
    {
        #region VARIABLES

        int _ID;
        int _CandidateID;
        string _Name;
        string _AuthorityIssue;
        DateTime _IssueDate;
        DateTime _FromDate;
        DateTime _ToDate;
        string _Grade;
        string _Speciality;

        #endregion
        
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        [DataMember]
        public int CandidateID
        {
            get { return _CandidateID; }
            set { _CandidateID = value; }
        }
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        [DataMember]
        public string AuthorityIssue
        {
            get { return _AuthorityIssue; }
            set { _AuthorityIssue = value; }
        }
        [DataMember]
        public DateTime IssueDate
        {
            get { return _IssueDate; }
            set { _IssueDate = value; }
        }
        [DataMember]
        public string Grade
        {
            get { return _Grade; }
            set { _Grade = value; }
        }
        [DataMember]
        public string Speciality
        {
            get { return _Speciality; }
            set { _Speciality = value; }
        }
        [DataMember]
        public DateTime FromDate
        {
            get { return _FromDate; }
            set { _FromDate = value; }
        }
        [DataMember]
        public DateTime ToDate
        {
            get { return _ToDate; }
            set { _ToDate = value; }
        }        

    }

}
